package com.dao.impl;

import com.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("userDao")
public class UserDaoImpl implements UserDao {
    @Autowired
    UserDao userDao;
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
    @Override
    public boolean login(String username, String password) {
        if (username.equals("张三") && password.equals("123")){
            return true;
        }
        return false;
    }

    @Override
    public void insert() {
        System.out.println("这是UserDao的insert方法");
    }

    @Override
    public void delete() {
        System.out.println("这是UserDao的delete方法");
    }

    @Override
    public void update() {
        System.out.println("这是UserDao的update方法");
    }

    @Override
    public void select() {
        System.out.println("这是UserDao的select方法");
    }
}
